/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ihm.menu;

import com.ihm.actions.*;
import javax.swing.*;

/**
 *
 * @author sylverster
 */
public class Menu {
   
    private JMenuBar menuBar = new JMenuBar();

    private JMenu menu1 = new JMenu(new IndexAction("Mini S.I.G"));
        private JMenuItem Menu1Item1 = new JMenuItem(new QuitterAction("Quitter"));
    
    private JMenu menu2 = new JMenu("Consultation");
        private JMenuItem Menu2Item1 = new JMenuItem(new HistoriqueAction("Historique des actions"));
    
    private JMenu menu3 = new JMenu(new AideAction("Panel d'édition"));
        private JMenuItem Menu3Item1 = new JMenuItem(new AjouterCarteAction("Ajouter une carte"));
        private JMenuItem Menu3Item2 = new JMenuItem(new AjouterNewsAction("Ajouter une news"));
        private JMenuItem Menu3Item3 = new JMenuItem(new ListeNewsEditionAction("Liste des news"));
    
    private JMenu menu4 = new JMenu("?");
        private JMenuItem Menu4Item1 = new JMenuItem(new AideAction("Aide"));
        private JMenuItem Menu4Item2 = new JMenuItem(new ConceptionAction("Conception"));
        
    //private JMenuItem Menu4Item3 = new JMenuItem(new PetiteFenetreAction("Test"));
    
    public Menu()
    {
        
        /*
         *  Déclaration des variables 
         */

         menuBar.add(menu1);
            menu1.add(Menu1Item1);

         menuBar.add(menu2);
            menu2.add(Menu2Item1);

         menuBar.add(menu3);
            menu3.add(Menu3Item1);
            menu3.add(Menu3Item2);
            menu3.add(Menu3Item3);
            
         menuBar.add(menu4);
            menu4.add(Menu4Item1);
            menu4.add(Menu4Item2);
            
 
    }

    public JMenuBar getMenuBar() {
        return menuBar;
    }
    
}
